<?php

namespace Modules\Topic\Entities;

use Modules\Core\Entities\BaseEntity as Model;
use ThrowException;

class TopicGroup extends Model
{
    protected $guarded = [];
    protected $table = 'topic_groups';

    static public $resourceName = '圈子';

    public function topics()
    {
    	return $this->hasMany('\Modules\Topic\Entities\Topic', 'group_id');
    }

    public function onstock_topics()
    {
    	return $this->topics()->onStock();
    }

}
